package com.hmdp.service;

import com.hmdp.annotion.ReliableMessage;
import org.springframework.stereotype.Service;

@Service
public class OrderService {
    
    @ReliableMessage(serviceName = "inventoryService", methodName = "deductStock")
    public void createOrder(String order) {
        // 1. 创建订单
        // 2. 减少库存等操作将通过可靠消息发送
    }
    
    @ReliableMessage(serviceName = "paymentService", methodName = "confirmPayment", maxRetry = 5, retryInterval = 30)
    public void confirmOrder(Long orderId) {
        // 确认订单
        // 支付确认将通过可靠消息发送
    }
}